package com.broada.apm.util;

import org.apache.wink.server.handlers.HandlersChain;
import org.apache.wink.server.handlers.MessageContext;
import org.apache.wink.server.handlers.RequestHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.broada.apm.utils.ExceptionUtils;

public class MyRequestHandler implements RequestHandler {
    private static final Logger LOG = LoggerFactory.getLogger(MyRequestHandler.class);
	public void init(java.util.Properties props) {
        /* This class is initialized with runtime properties. */
	}

	public void handleRequest(MessageContext context, HandlersChain chain) {
		try {
			chain.doChain(context);
		} catch (Throwable e) {
		    ExceptionUtils.error(LOG, "请求处理过程出错", e);
		}
	}
}
